/* type Props = {
  id: string
  children: number[]
}

// 都变为可选的
type PartialProps = Partial<Props>
const user: PartialProps = { id: '888' } */

/* type Props = {
  id: string
  children: number[]
}

// 都加了 readonly
type ReadonlyProps = Readonly<Props>

const user: ReadonlyProps = { id: '888', children: [1]}
user.id = '123' */


interface Props {
  id: string
  title: string
  children: number[]
}
// 摘出 id 和 title
type PickProps = Pick<Props, 'id' | 'title'>

let user: PickProps = { id: '888', title: 'abc' }

// 排除 id 和 title
type OmitProps = Omit<Props, 'id' | 'title'>
let xxx: OmitProps = { children: [1] }


export {}